#!/usr/bin/env python
#-*- coding:utf8 -*-
import web
import hashlib
from app.models.model import Model
class Quest(Model):
    table = 'quests'

    #创建任务
    def create(self,sid,type):
        if self.get_by("sid = '%s' and type = '%s'" % (sid, type)):
            return True
        try:
            return self.insert(sid = sid, type = type)
        except:
            return False
